var httpServer = {
	//登录
	login: function($resource, post_data,call) {
        jq("#process").css({"width": "30%"});
        $resource("/api/User/GetUser").get(post_data, function (res) {
            call(res);
        },function (res) {
            
        });
    },
    modifyPsd: function ($resource, post_data, call) {
        $resource("/api/User/Getuserupd").get(post_data, function (res) {
            call(res);
        }, function (res) {

        });
    },
    getSubject:function ($resourse,post_data,call) {
        $resourse('/api/Teacher/GetEmployeeGradeCourse').get(post_data,function (res) {
            call(res);
        },function (res) {

        });
    },
    getMaterial:function ($resourse,post_data,call) {
        $resourse('/api/Teacher/GetMaterial').get(post_data,function (res) {
            call(res);
        },function (res) {

        });
    },
    getPlace:function ($resourse,call) {
        $resourse('/api/Teacher/Getexercises_place').get(function (res) {
            call(res);
        },function (res) {

        });
    },
    getBookType:function ($resource,postdata,call) {
      $resource('/api/Teacher/Getbooktype').get(postdata,function (res) {
          call(res);
      },function (res) {

      });
    },
    getType:function ($resourse,call) {
        $resourse('/api/Teacher/Getexercises_type').get(function (res) {
            call(res);
        },function (res) {

        });
    },
    getDiff:function ($resourse,call) {
        $resourse('/api/Teacher/Getexercises_defficult').get(function (res) {
            call(res);
        },function (res) {

        });
    },
    getChapter:function (resource,postdata,call) {
        resource('/api/Teacher/GetChapter').get(postdata,function (res) {
            call(res);
        },function (res) {

        });
    },
    getPoint:function (resource,postdata,call) {
        resource('/api/Teacher/GetKnowledgePoints').get(postdata,function (res) {
            call(res);
        },function (res) {

        });
    },
    getData:function (resource,postdata,call) {
        resource('/api/Teacher/Getxt_exercises').get(postdata,function (res) {
            call(res);
        },function (res) {

        });
    },
    getErrStu: function (resource, call) {
        resource('/modules/teacher/controllers/dataSrc.js').get(function (res) {
            call(res);
        }, function (res) {
            alert(res.message)
        });
    },
    getErrChapter: function (resource, call) {
        resource('/modules/teacher/controllers/dataErrPoint.js').get(function (res) {
            call(res);
        }, function (res) {

        });
    }
};
app.factory('callSerive',function(){
    var obj={};
    obj.error='';
    obj.success='';
    obj.setdata=function ($resource,postdata,callback) {
        $resource("/api/Teacher/Getmy_exercises").get(postdata,function (res) {
            callback(res);
        },function (res) {

        });
    };
    obj.delData=function ($resource,postdata,callback) {
        $resource("/api/Teacher/Delexercises").get(postdata,function (res) {
            callback(res);
        },function (res) {

        });
    };
    return obj;
});